翻訳と辞書
Words near each other
・ Extension (predicate logic)
・ Extension (semantics)
・ Extension (telephone)
・ Extension 720
・ Extension agency
・ Extension and contraction of ideals
・ Extension bell
・ Extension by definitions
・ Extension conflict
・ Extension cord
・ Extension Ensemble
・ Extension Formation
・ Extension Gunners
・ Extension Language Kit
・ Extension mechanisms for DNS
Extension method
・ Extension neglect
・ Extension neural network
・ Extension of a Man
・ Extension of a polyhedron
・ Extension of a topological group
・ Extension of the Wish
・ Extension of University Education Act, 1959
・ Extension Poly(A) Test
・ Extension Reef
・ Extension Scouting
・ Extension Service
・ Extension studies
・ Extension topology
・ Extension transference


Dictionary Lists
翻訳と辞書 辞書検索 [ 開発暫定版 ]
スポンサード リンク

Extension method : ウィキペディア英語版
Extension method

In object-oriented computer programming, an extension method is a method added to an object after the original object was compiled. The modified object is often a class, a prototype or a type. Extension methods are features of some object-oriented programming languages. There is no syntactic difference between calling an extension method and calling a method declared in the type definition.〔(【引用サイトリンク】title=Extension Methods )
Eric Lippert, a principal developer on the C# compiler team, says "Extension methods certainly are not object-oriented.".〔(【引用サイトリンク】title=The Future of C#, Part Two - Fabulous Adventures In Coding )
==Support in programming languages==
Extension methods are features of numerous languages including C#, Gosu, Javascript, Oxygene, Ruby, Smalltalk and Visual Basic.NET.
In VB.NET and Oxygene, they are recognized by the presence of the "extension" keyword or attribute.
In C# they're implemented as static methods in static classes, with the first argument being of extended class and preceded by "this" keyword.
In Smalltalk, any code can add a method to any class at any time, by sending a method creation message (such as methodsFor:) to the class the user wants to extend. The Smalltalk method category is conventionally named after the package that provides the extension, surrounded by asterisks. For example, when Etoys application code extends classes in the core library, the added methods are put in the
*etoys
*
category.
In Ruby, like Smalltalk, there is no special language feature for extension, as Ruby allows classes to be re-opened at any time with the class keyword, in this case to add new methods. The Ruby community often describes an extension method as a kind of monkey patch.
In Swift, the extension keyword marks a class-like construct that allows the addition of methods, constructors, and fields to an existing class, including the ability to implement a new interface/protocol to the existing class.

抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)
ウィキペディアで「Extension method」の詳細全文を読む



スポンサード リンク
翻訳と辞書 : 翻訳のためのインターネットリソース

Copyright(C) kotoba.ne.jp 1997-2016. All Rights Reserved.